<script>
export default {
	onLaunch: function() {
		//地址加上？解决支付的时候URL未注册
		if(!location.search){
			location.replace(location.origin+location.pathname+"?from=web"+location.hash)
			return
		}
		
		this.$comm.request({
			url: 'api/web_config',
			method: 'GET',
			success: res => {
				let jssdk = res.data.result.jssdk
				this.$wx.config({
					debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
					appId: jssdk.appId, // 必填，公众号的唯一标识
					timestamp: jssdk.timestamp, // 必填，生成签名的时间戳
					nonceStr: jssdk.nonceStr, // 必填，生成签名的随机串
					signature: jssdk.signature, // 必填，签名
					jsApiList: ['chooseImage', 'updateAppMessageShareData', 'updateTimelineShareData'] // 必填，需要使用的JS接口列表
				});
			}
		});
	},
	onShow: function() {
		console.log('App Show');
	},
	onHide: function() {
		console.log('App Hide');
	},
	globalData:{
		login:true
	}
};
</script>

<style>
/* @import url('/common/zcm-main.css');
@import url('/common/main.css'); */
/*每个页面公共css */
uni-page-head[uni-page-head-type='default'] ~ uni-page-wrapper {
	height: auto;
}

uni-checkbox .uni-checkbox-input {
		border-radius: 50% !important;
		color: #ffffff !important;
		border: 1px solid #777777;
		width: 36rpx;
		height: 36rpx;
	}

	uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
		color: #fff;
		background: #0ba29a !important;
		border: 1px solid #0ba29a !important;
	}
	
	uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked:before{
		font-size: 32rpx;
	}


	uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
		border: 1px solid #777777;
	}


	uni-radio .uni-radio-input {
		border-radius: 50% !important;
		color: #ffffff !important;
		border: 1px solid #777777;
		width: 32rpx;
		height: 32rpx;
	}

	uni-radio .uni-radio-input.uni-radio-input-checked {
		color: #fff;
		background: #0ba29a !important;
		border: 1px solid #0ba29a !important;
	}

	uni-radio .uni-radio-input.uni-radio-input-checked:before {
		font-size: 26rpx;
	}

	uni-radio:not([disabled]) .uni-radio-input:hover {
		border: 1px solid #777777;
	}
</style>
